import java.util.Scanner;

import static javafx.application.Platform.exit;

public class StudentMenu {
    Scanner in = new Scanner(System.in);

    public StudentMenu(String user) {
        this.menu(user);
    }

    public void menu(String user){
        boolean flag = true;
        while(flag)
        {
            StudentFile studentFile = new StudentFile();
            System.out.println("=======欢迎进入学生系统=======");
            System.out.println("—————————请输入功能——————————");
            System.out.println("1.修改密码");
            System.out.println("2.查看个人信息");
            System.out.println("其他：退出学生系统");
            System.out.println("---------------------------");
            System.out.print("请输入：");
            int num = in.nextInt();
            switch(num){
                case 1:studentFile.updatePwd(user);break;
                case 2:studentFile.printself(user);break;
                default:flag=false;
            }
        }

    }
}
